[mirrors]
http://dev.gentoo.org/~blueness/eudev/eudev-3.1.2.tar.gz

[vars]
filesize=1858004
sha512=d9aeb37a163ce4a0c116f75a927b4b99f8445d06624fbb3c28ade18f3effd8c54af5a4a52477c31a0452822a3dc0901468263195256e9dbf79d2ef08cf46f2b6

[deps]
kernel-headers
libblkid
glib
kmod
gperf

[build]
#eudev 3.1.5 is broken (doesn't compile libgudev), use 3.1.2.
#removed, unrecognised options:
# --with-firmware-path=, --disable-keymap, --with-modprobe=, --enable-modules, --enable-rule-generator

#20160526 mystery, doing "butch rebuild", installing to /, compiled before, this time:
# fatal error: scsi/scsi.h: No such file or directory
#ok, scsi.h, scsi_ioctl.h, sg.h are installed by musl. they were there earlier.
#...i think qky-kernel did it, have modified its recipe.

CFLAGS="-D_GNU_SOURCE $optcflags" \
LDFLAGS="$optldflags -lblkid" \
  ./configure -C --prefix="$butch_prefix" $xconfflags \
  --with-rootlibdir=/lib --enable-introspection=no --disable-selinux \
  --with-rootprefix= --disable-gtk-doc --disable-manpages \
  --enable-split-usr --exec-prefix= --enable-hwdb --enable-kmod

#when install to /, src/eudev/Makefile has a problem:
#install-exec-hook:
#	if test "$(bindir)" != "$(sbindir)"; then \
#		$(LN_S) -n -f $(bindir)/udevadm $(DESTDIR)$(sbindir)/udevadm; \
#	fi
if ! $butch_do_custom_destdir ; then
 sed -i 's%$(LN_S)%true #ln -s%' src/udev/Makefile
fi

make -j$MAKE_THREADS

make DESTDIR="$butch_install_dir" install

#install fixes...
dest="$butch_install_dir""$butch_prefix"
if [ -d "$dest"/share/pkgconfig ];then
 mkdir -p "$dest"/lib/pkgconfig
 cp -a -f "$dest"/share/pkgconfig/* "$dest"/lib/pkgconfig/
 rm -rf "$dest"/share/pkgconfig
fi
[ -h "$dest"/sbin/udevadm ] && rm -f "$dest"/sbin/udevadm

#remove all the rules, they are supplied by quirky rootfs-skeleton...
#gotta get rid of these anyway, as they totally stuff up module loading...
rm -f "$dest"/lib/udev/rules.d/*.rules

